package com.logicwin.aibala.ui.screens.Downloads;

import java.util.ArrayList;
import java.util.List;

import android.os.Bundle;
import android.os.Handler;
import android.widget.ListView;

import com.logicwin.aibala.R;
import com.logicwin.aibala.model.androidSWInfo.AndroidSWInfoService;
import com.logicwin.aibala.ui.screens.Screen;

public class ScreenDownloads extends Screen {
	private ListView mListDownloads;
	private Handler mHandler = new Handler();
	
	public ScreenDownloads() {
		super(SCREEN_TYPE.DOWNLOAD_T, ScreenDownloads.class.getCanonicalName());
	}
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.screen_download);
		initScreenDownload();
	}
	
	private void initScreenDownload(){
		mListDownloads = (ListView) findViewById(R.id.screen_download_listview_all_apks);
		ScreenDownloadApkAdapter adapterDownloads = new ScreenDownloadApkAdapter(this,
				AndroidSWInfoService.getAPKInstallList());
		mListDownloads.setAdapter(adapterDownloads);
		mListDownloads.setOnItemClickListener(adapterDownloads);	
	}
	public boolean haveMenu() {
		return true;
	}	
	public Handler getHandler(){
		return mHandler;
	}
}
